//
//  SixVideoView.m
//  YUNWUMeetingDemo
//
//  Created by mac on 2019/7/19.
//  Copyright © 2019 DGL. All rights reserved.
//

#import "SixVideoView.h"

@implementation SixVideoView
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUI];
    }
    return self;
}

#pragma mark -- UI
- (void)setUI{
    _sixOneView = [[CustomCameraView alloc]init];
    _sixOneView.backgroundColor = [UIColor yellowColor];
    [self addSubview:_sixOneView];
    [_sixOneView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.mas_equalTo(self);
        make.width.mas_equalTo((Width-1)/3);
        make.height.mas_equalTo((Width-40)/3 + 50);
    }];
    
    _sixTwoView = [[CustomCameraView alloc]init];
    _sixTwoView.backgroundColor = [UIColor greenColor];
    [self addSubview:_sixTwoView];
    [_sixTwoView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_sixOneView.mas_right).offset(1);
        make.top.mas_equalTo(self.mas_top);
        make.width.mas_equalTo(_sixOneView.mas_width);
        make.height.mas_equalTo(_sixOneView.mas_height);
    }];
    
    _sixThreeView = [[CustomCameraView alloc]init];
    _sixThreeView.backgroundColor = [UIColor grayColor];
    [self addSubview:_sixThreeView];
    [_sixThreeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.mas_equalTo(self);
        make.width.mas_equalTo(_sixThreeView.mas_width);
        make.height.mas_equalTo(_sixThreeView.mas_height);
    }];
    
    _sixFourView = [[CustomCameraView alloc]init];
    _sixFourView.backgroundColor = [UIColor grayColor];
    [self addSubview:_sixFourView];
    [_sixFourView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left);
        make.top.mas_equalTo(_sixOneView.mas_bottom).offset(1);
        make.width.mas_equalTo(_sixOneView.mas_width);
        make.height.mas_equalTo(_sixOneView.mas_height);
    }];
    
    _sixFiveView = [[CustomCameraView alloc]init];
    _sixFiveView.backgroundColor = [UIColor greenColor];
    [self addSubview:_sixFiveView];
    [_sixFiveView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_sixFourView.mas_right).offset(1);
        make.top.mas_equalTo(_sixTwoView.mas_bottom).offset(1);
        make.width.mas_equalTo(_sixOneView.mas_width);
        make.height.mas_equalTo(_sixOneView.mas_height);
    }];
    
    _sixSixView = [[CustomCameraView alloc]init];
    _sixSixView.backgroundColor = [UIColor grayColor];
    [self addSubview:_sixSixView];
    [_sixSixView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self.mas_right);
        make.top.mas_equalTo(_sixThreeView.mas_bottom).offset(1);
        make.width.mas_equalTo(_sixOneView.mas_width);
        make.height.mas_equalTo(_sixOneView.mas_height);
    }];
}

@end
